<div ng-controller="host.views.settings.index as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-6">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>@L("Settings")</span> <small>@L("SettingsHeaderInfo")</small>
                    </h1>
                </div>
            </div>
        </div>
        <div class="col-xs-6 text-right">
            <button class="btn btn-primary blue" ng-click="vm.saveAll()"><i class="fa fa-floppy-o"></i> @L("SaveAll")</button>
        </div>
    </div>
    <div class="portlet light">
        <div class="portlet-body">
            <tabset class="tab-container tabbable-line">

                <tab heading="@L("General")">
                    <div class="form-group form-md-line-input form-md-floating-label">
                        <input class="form-control" type="url" name="WebSiteRootAddress" ng-class="{'edited':vm.settings.general.webSiteRootAddress}" ng-model="vm.settings.general.webSiteRootAddress" required maxlength="128">
                        <label>@L("ThisWebSiteRootAddress")</label>
                        <span class="help-block">@L("ThisWebSiteRootAddress_Hint")</span>
                    </div>
                </tab>

                <tab heading="@L("UserManagement")">
                    <div class="md-checkbox-list">
                        <div class="md-checkbox">
                            <input id="Settings_IsEmailConfirmationRequiredForLogin" class="md-check" type="checkbox" name="IsEmailConfirmationRequiredForLogin" ng-model="vm.settings.userManagement.isEmailConfirmationRequiredForLogin">
                            <label for="Settings_IsEmailConfirmationRequiredForLogin">
                                <span class="inc"></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                @L("EmailConfirmationRequiredForLogin")
                            </label>
                        </div>
                    </div>
                </tab>

                <tab heading="@L("EmailSmtp")">
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="email" name="DefaultFromAddress" class="form-control" ng-class="{'edited':vm.settings.email.defaultFromAddress}" ng-model="vm.settings.email.defaultFromAddress" maxlength="@MyCompanyName.AbpZeroTemplate.Authorization.Users.User.MaxEmailAddressLength">
                        <label>@L("DefaultFromAddress")</label>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="text" name="DefaultFromDisplayName" class="form-control" ng-class="{'edited':vm.settings.email.defaultFromDisplayName}" ng-model="vm.settings.email.defaultFromDisplayName" maxlength="128">
                        <label>@L("DefaultFromDisplayName")</label>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="text" name="SmtpHost" class="form-control input-ltr" ng-class="{'edited':vm.settings.email.smtpHost}" ng-model="vm.settings.email.smtpHost" maxlength="64">
                        <label>@L("SmtpHost")</label>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="number" name="SmtpPort" class="form-control edited" ng-class="{'edited':vm.settings.email.smtpPort}" ng-model="vm.settings.email.smtpPort" maxlength="5">
                        <label>@L("SmtpPort")</label>
                    </div>

                    <div class="md-checkbox-list">
                        <div class="md-checkbox">
                            <input id="Settings_SmtpEnableSsl" class="md-check" type="checkbox" name="SmtpEnableSsl" ng-model="vm.settings.email.smtpEnableSsl">
                            <label for="Settings_SmtpEnableSsl">
                                <span class="inc"></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                @L("UseSsl")
                            </label>
                        </div>
                        <div class="md-checkbox">
                            <input id="Settings_SmtpUseDefaultCredentials" class="md-check" type="checkbox" name="SmtpUseDefaultCredentials" ng-model="vm.settings.email.smtpUseDefaultCredentials">
                            <label for="Settings_SmtpUseDefaultCredentials">
                                <span class="inc"></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                @L("UseDefaultCredentials")
                            </label>
                        </div>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="!vm.settings.email.smtpUseDefaultCredentials">
                        <input type="text" name="SmtpDomainName" class="form-control input-ltr" ng-class="{'edited':vm.settings.email.smtpDomain}" ng-model="vm.settings.email.smtpDomain" maxlength="128">
                        <label>@L("DomainName")</label>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="!vm.settings.email.smtpUseDefaultCredentials">
                        <input type="text" name="SmtpUserName" class="form-control input-ltr" ng-class="{'edited':vm.settings.email.smtpUserName}" ng-model="vm.settings.email.smtpUserName" maxlength="128">
                        <label>@L("UserName")</label>
                    </div>

                    <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="!vm.settings.email.smtpUseDefaultCredentials">
                        <input type="password" name="SmtpPassword" class="form-control" ng-class="{'edited':vm.settings.email.smtpPassword}" ng-model="vm.settings.email.smtpPassword" maxlength="128">
                        <label>@L("Password")</label>
                    </div>
                </tab>
            </tabset>
        </div>
    </div>
</div>
